<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>欢迎页</title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="/css/core/bootstrap/bootstrap.css">
<!-- 引入jQuery -->
<script src="/js/jquery-2.0.0.js?v=201505241044"></script>
<script src="/js/Highcharts-4.2.3/js/highcharts.js?v=201505301341"></script>
<script src="js/Highcharts-4.2.3/js/modules/exporting.js?v=201505301341"></script>
<script type="text/javascript">
	$(function() {
		$.post('/orderStatisticsController/getPicCount', function(result) {
			var fee1 = new Array();
			fee1[0] = result.fee1/100;
			var fee2 = new Array();
			fee2[0] = result.fee2/100;
			var fee3 = new Array();
			fee3[0] = result.fee3/100;
			highcharts('container1', 'container2', '代收快递：最近半年费用合计图', '代收快递：最近半年数量走势图', fee1, result.months, result.count1);
			highcharts('container3', 'container4', '代发快递：最近半年费用合计图', '代发快递：最近半年数量走势图', fee2, result.months, result.count2);
			highcharts('container5', 'container6', '代洗衣服：最近半年费用合计图', '代洗衣服：最近半年数量走势图', fee3, result.months, result.count3);
		}, 'json');
	});
	function highcharts(con1, con2, title1, title2, fee, months, count) {
		$('#' + con1).highcharts({
	        chart: {
	            type: 'column'
	        },
	        title: {
	            text: title1,
	            style: {
					fontSize: '16px'
	            }
	        },
	        tooltip: {
	            valueSuffix: '元'
	        },
	        credits: {
	            enabled:false
	  		},
	  		exporting: {
	            enabled:false
			},
			legend: { 
				enabled: false 
			},
	        xAxis: {
	            categories: [
	                '费用'
	            ]
	        },
	        yAxis: {
	            min: 0,
	            title: {
	                text: '费用 (元)'
	            }
	        },
	        series: [{
	            name: '费用',
	            data: fee
	        }]
	    });
		
		$('#' + con2).highcharts({
	        title: {
	            text: title2,
	            style: {
					fontSize: '16px'
	            }
	        },
	        credits: {
	            enabled:false
	  		},
	  		exporting: {
	            enabled:false
			},
			legend: { 
				enabled: false 
			},
	        xAxis: {
	            categories: months
	        },
	        yAxis: {
	            title: {
	                text: '数量 (个)'
	            },
	            plotLines: [{
	                value: 0,
	                width: 1,
	                color: '#808080'
	            }]
	        },
	        tooltip: {
	            valueSuffix: '个'
	        },
	        series: [{
	            name: '数量',
	            data: count
	        }]
	    });
	}
	
	function openTj(type) {
		top.createTab('order_count', '订单统计', '/views/statisticsQuery/orderStatistics.jsp?type=' + type);
	}
</script>
</head>
<body>
	<div class="wrapper wrapper-content">
		<div class="page-content">
			<div class="main">
				<div class="w-view">
					<table style="width: 90%;">
						<tr style="border-bottom: gray solid 1px;">
							<td align="center">
								<a href="javascript:void(0);" onclick="openTj(1)"><div id="container1" style="height: 170px;" align="center"></div></a>
							</td>
							<td align="center">
								<a href="javascript:void(0);" onclick="openTj(1)"><div id="container2" style="height: 170px;" align="center"></div></a>
							</td>
						</tr>
						<tr style="border-bottom: gray solid 1px;">
							<td align="center">
								<a href="javascript:void(0);" onclick="openTj(2)"><div id="container3" style="height: 170px;" align="center"></div></a>
							</td>
							<td align="center">
								<a href="javascript:void(0);" onclick="openTj(2)"><div id="container4" style="height: 170px;" align="center"></div></a>
							</td>
						</tr>
						<tr>
							<td align="center">
								<a href="javascript:void(0);" onclick="openTj(3)"><div id="container5" style="height: 170px;" align="center"></div></a>
							</td>
							<td align="center">
								<a href="javascript:void(0);" onclick="openTj(3)"><div id="container6" style="height: 170px;" align="center"></div></a>
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
	</div>
</body>
</html>